package com.xb.springtest.service.Impl;

import com.xb.springtest.dao.UserDao;
import com.xb.springtest.service.UserService;
import com.xb.springtest.dto.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public List<User> UserList(String name) {
        return userDao.UserList(name);
    }

    @Override
    public void addCategory(User user) {
        userDao.addCategory(user);
    }

    @Override
    public int updateCategory(User user) {
        return userDao.updateCategory(user);
    }

    @Override
    public void deleteCategory(int id) {
        userDao.updateCategory(id);
    }

    @Override
    public User getCategory(int id) {
        return userDao.getCategory(id);
    }
}
